import request from '../utils/request';

/**
 * 商户-获取订单
 * @param {*} obj
 */
export const getOrders = (obj) => {
  return request({
    url: "api/wechat/GetMerchantOrders",
    params: obj,
    method: "GET",
  });
};

/**
 * 商户-订单确认收货
 * @param {*} obj
 */
export const merchantReceive = (obj) => {
  return request({
    url: "api/wechat/Merchant_Receive",
    data: obj,
    method: "POST",
  });
};

/**
* 商户-获取单个订单详情
* @param {*} obj
*/
export const getMerchantSingleOrder = (obj) => {
  return request({
    url: "api/wechat/GetMerchantSingleOrder",
    params: obj,
    method: "GET",
  });
};

/**
 * 取消订单
 * @param {*} obj
 */
export const cancelOrder = (obj) => {
  return request({
    url: "api/wechat/Merchant_CancelOrder",
    data: obj,
    method: "POST",
  });
};

/**
 * 商户-生成订单
 * @param {*} obj
 */
export const generateOrder = (obj) => {
  return request({
    url: "api/wechat/GenerateOrder",
    data: obj,
    method: "POST",
  });
};
